#include <stdio.h>

int Meanscore3()
{
    float Value,Mean,Sum;
    int nb_val;
    char Answer;
    char temp;
    Sum=0;
    nb_val=0;
    Answer='N'; // 'N'
    while (Answer!='Y' ){
        nb_val=nb_val+1;
        printf("Enter the value No. %d Real between 0 and 20\n",nb_val);
        // "Enter the value n:10 real between 0 and 20"
        scanf("%f",&Value);
        //scanf("%c",&temp);
        //temp = getchar();
        getchar();
        Sum=Sum+Value;
        printf("Do you want to stop (Y/N)?:\n");
        scanf("%c",&Answer);
        //printf("Answer =%c\n",Answer);

    }
    Mean=Sum/nb_val;
    printf("the mean is %f",Mean);

    return 0;
}

